<template>
    <view>
        <view class="ZEAI_list" :style="'--color:' + color + ';--rgbcolor:' + rgbcolor">
            <view @tap="uFn" class="a" :data-uid="item.uid" v-for="(item, item_index) in LIST" :key="item_index">
                <image class="m" :src="item.photo_m"></image>

                <view class="uinfo">
                    <view class="data">
                        <view class="span">
                            <image class="ugrade1" :src="item.grade_ico"></image>
                            <text class="font">{{ item.ageheighedu }}</text>
                        </view>
                        <view class="span">
                            <text class="b" v-if="item.jobpay.length > 0" v-for="(item2, index) in item.jobpay" :key="index">{{ item2 }}</text>
                        </view>
                    </view>
                </view>
                <image class="rzj" :src="item.rzj" v-if="item.rzj != ''"></image>
            </view>
        </view>
        <view class="blank"></view>
        <view class="my_mateshow_btm" :style="'--color:' + color + ';--rgbcolor:' + rgbcolor">
            <view @tap="matesetFn" class="a mateset">
                <text class="i ico"></text>
                设置
            </view>
            <view @tap="chanageFn" class="a">
                <text class="i ico"></text>
                换一组
            </view>
        </view>
    </view>
</template>

<script>
var t;
var a = require('../../res/www.a9a.cn.js');
var app = getApp();
export default {
    data() {
        return {
            color: '',
            rgbcolor: '',
            LIST: ''
        };
    },
    onLoad: function (t) {
        var that = this;
        app.globalData.chklogin().then(function (t) {
            t || uni.navigateBack();
        });
        app.globalData.get_openid().then(function (t) {
            that.setData({
                color: app.globalData._ZEAI.color,
                rgbcolor: a.c16_rgb(app.globalData._ZEAI.color)
            });
            that.getdata();
        });
    },
    onShareAppMessage: function () {},
    methods: {
        getdata: function () {
            var that = this;
            t = uni.getStorageSync('COOK_U');
            app.globalData.ajax({
                url: 'my_mateshow.php',
                data: {
                    submitok: 'index',
                    openid: t.openid
                },
                success: function (t) {
                    if (1 == t.flag) {
                        that.setData({
                            LIST: t.ARR
                        });
                    } else {
                        uni.showToast({
                            title: t.msg,
                            icon: 'none',
                            mask: true
                        });
                    }
                }
            });
        },

        uFn: function (t) {
            var a = t.currentTarget.dataset.uid;
            uni.navigateTo({
                url: '/pagesA/u/u?uid=' + a
            });
        },

        matesetFn: function () {
            uni.navigateTo({
                url: '/pagesA/reg/reg?currentTab=2'
            });
        },

        chanageFn: function () {
            this.getdata();
        }
    }
};
</script>
<style>
@import 'mateshow.css';
</style>
